<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>components-1 组件实例</title>
    <script type="text/javascript" src="../assests/js/vue.js"></script>
</head>
<body>
    <h1>components-1 组件实例</h1>
    <hr>
    <div id="app">
        <panpan></panpan>
    </div>
    <script>
        var city = {
            template:`<p style="color:green;">sichuan of China</p>`
        }
        var panpanComponents = {
            template:`
                <div style="color:red;">
                    <p>panda from China!</p>
                    <city></city>
                </div>
            `,
            components:{
                "city":city
            }
        };
        var app = new Vue({
            el:"#app",
            data:{
                message:"hello world!"
            },
            components:{
                "panpan":panpanComponents
            }
        });
    </script>
</body>
</html>